how to find the last digit of a number